<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .big-box {
            width: 1000px;
            /*height: 100px;*/
            border: 1px solid #ff0000;
            background-color: #7cb4db;
            /*清除浮动干扰*/
            overflow: hidden;
        }

        .big-box div {
            width: 200px;
            height: 80px;
        }

        .big-box .box1 {
            background-color: #42cedd;
            /*display: inline-block;*/
            float: left;/*浮动到左边*/
        }

        .big-box .box2 {
            background-color: rgba(208, 10, 238, 0.65);
            /*display: inline-block;*/
            float: right; /*浮动到右边*/
        }
    </style>
</head>
<body>
<div class="big-box">
    <div class="box1">盒子1</div>
    <div class="box2">盒子2</div>
</div>
</body>
</html>
